Skip to contentSkip to conversation

Change in openvpn[master]: Remove NTLM support

Openvpn-devel In review flichtenheld (Code Review) 2 participants 10 messages Dec 19, 2025 – Feb 16 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1766158651000.I1f5724476862935284f620c54afa510eea03e3f9@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email

to review the following change.

Change subject: Remove NTLM support
......................................................................

Remove NTLM support

Since Microsoft has abandonded this I think it is time for us to do the same for OpenVPN 2.8.

Leaves a stub ntlm_support in to make cross-branch t_client.rc easier to maintain.

Change-Id I1f5724476862935284f620c54afa510eea03e3f9

---
M CMakeLists.txt
M config.h.cmake.in
M configure.ac
M doc/doxygen/openvpn.doxyfile.in
M doc/man-sections/proxy-options.rst
M src/openvpn/Makefile.am
D src/openvpn/ntlm.c
D src/openvpn/ntlm.h
M src/openvpn/options.c
M src/openvpn/proxy.c
M src/openvpn/proxy.h
M src/openvpn/syshead.h
M tests/Makefile.am
M tests/ntlm_support.c

14 files changed, 9 insertions(+), 625 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/53/1453/1

CMakeLists.txt +0 -2
index bdad173..f96103c 100644
@@ -506,8 +506,6 @@
     src/openvpn/multi.h
     src/openvpn/multi_io.h
     src/openvpn/multi_io.c
-    src/openvpn/ntlm.c
-    src/openvpn/ntlm.h
     src/openvpn/occ.c
     src/openvpn/occ.h
     src/openvpn/openvpn.c
config.h.cmake.in +0 -3
index 01bbadc..cb0169d 100644
@@ -35,9 +35,6 @@
 /* Enable dns-updown script hook */
 #cmakedefine ENABLE_DNS_UPDOWN
 
-/* Enable NTLMv2 proxy support */
-#define ENABLE_NTLM 1
-
 /* Enable management server capability */
 #define ENABLE_MANAGEMENT 1
 
configure.ac +0 -8
index f363e0f..50a3cea 100644
@@ -102,13 +102,6 @@
 )
 
 AC_ARG_ENABLE(
-	[ntlm],
-	[AS_HELP_STRING([--disable-ntlm], [disable NTLMv2 proxy support @<:@default=yes@:>@])],
-	,
-	[enable_ntlm="yes"]
-)
-
-AC_ARG_ENABLE(
 	[plugins],
 	[AS_HELP_STRING([--disable-plugins], [disable plug-in support @<:@default=yes@:>@])],
 	,
@@ -1201,7 +1194,6 @@
 test "${enable_fragment}" = "yes" && AC_DEFINE([ENABLE_FRAGMENT], [1], [Enable internal fragmentation support])
 test "${enable_port_share}" = "yes" && AC_DEFINE([ENABLE_PORT_SHARE], [1], [Enable TCP Server port sharing])
 test "${enable_dns_updown_by_default}" = "yes" && AC_DEFINE([ENABLE_DNS_UPDOWN_BY_DEFAULT], [1], [Enable dns-updown hook by default])
-test "${enable_ntlm}" = "yes" && AC_DEFINE([ENABLE_NTLM], [1], [Enable NTLMv2 proxy support])
 test "${enable_crypto_ofb_cfb}" = "yes" && AC_DEFINE([ENABLE_OFB_CFB_MODE], [1], [Enable OFB and CFB cipher modes])
 OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CFLAGS}"
 OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_LIBS}"
doc/doxygen/openvpn.doxyfile.in +0 -1
index bdbc608..5b8e262 100644
@@ -2212,7 +2212,6 @@
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 PREDEFINED             = _WIN32 \
-                         NTLM \
                          USE_LZO \
                          ENABLE_FRAGMENT \
                          P2MP \
doc/man-sections/proxy-options.rst +3 -6
index 38c4578..7123838 100644
@@ -7,7 +7,7 @@
   ``--http-proxy-user-pass`` option (See `INLINE FILE SUPPORT`_).
 
   The last optional argument is an ``auth-method`` which should be one
-  of :code:`none`, :code:`basic`, or :code:`ntlm2`.
+  of :code:`none`, :code:`basic`.
 
   HTTP Digest authentication is supported as well, but only via the
   :code:`auto` or :code:`auto-nct` flags (below).  This must replace
@@ -31,8 +31,6 @@
      http-proxy proxy.example.net 3128 authfile.txt
      # basic authentication, ask user for credentials
      http-proxy proxy.example.net 3128 stdin
-     # NTLM authentication, load credentials from file
-     http-proxy proxy.example.net 3128 authfile.txt ntlm2
      # determine which authentication is required, ask user for credentials
      http-proxy proxy.example.net 3128 auto
      # determine which authentication is required, but reject basic
@@ -47,9 +45,8 @@
      password
      </http-proxy-user-pass>
 
-  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7.
-  :code:`ntlm` now is an alias for :code:`ntlm2`; i.e. OpenVPN will always
-  attempt to use NTLMv2 authentication.
+  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7
+  and support for NTLMv2 proxies was removed with OpenVPN 2.8.
 
 --http-proxy-user-pass userpass
   Overwrite the username/password information for ``--http-proxy``. If specified
src/openvpn/Makefile.am +0 -1
index db87dfc..8443807 100644
@@ -99,7 +99,6 @@
 	networking_iproute2.c networking_iproute2.h \
 	networking_sitnl.c networking_sitnl.h \
 	networking.h \
-	ntlm.c ntlm.h \
 	occ.c occ.h \
 	openssl_compat.h \
 	pkcs11.c pkcs11.h pkcs11_backend.h \
src/openvpn/ntlm.c deleted +0 -395

395 lines not on this page · raw message

src/openvpn/ntlm.h deleted +0 -12
deleted file mode 100644
index b0a6821..0000000
@@ -1,12 +0,0 @@
-#ifndef NTLM_H
-#define NTLM_H
-
-#if NTLM
-
-const char *ntlm_phase_1(const struct http_proxy_info *p, struct gc_arena *gc);
-
-const char *ntlm_phase_3(const struct http_proxy_info *p, const char *phase_2, struct gc_arena *gc);
-
-#endif
-
-#endif
src/openvpn/options.c +1 -2
index 34af0d3..dabb75b 100644
@@ -158,8 +158,7 @@
     "                  through an HTTP proxy at address s and port p.\n"
     "                  If proxy authentication is required,\n"
     "                  up is a file containing username/password on 2 lines, or\n"
-    "                  'stdin' to prompt from console.  Add auth='ntlm2' if\n"
-    "                  the proxy requires NTLM authentication.\n"
+    "                  'stdin' to prompt from console.\n"
     "--http-proxy s p 'auto[-nct]' : Like the above directive, but automatically\n"
     "                  determine auth method and query for username/password\n"
     "                  if needed.  auto-nct disables weak proxy auth methods.\n"
src/openvpn/proxy.c +3 -158

209 lines not on this page · raw message

src/openvpn/proxy.h +1 -1
index d14725c..238a32e 100644
@@ -31,7 +31,7 @@
 #define HTTP_AUTH_BASIC  1
 #define HTTP_AUTH_DIGEST 2
 /* #define HTTP_AUTH_NTLM   3 removed in OpenVPN 2.7 */
-#define HTTP_AUTH_NTLM2  4
+/* #define HTTP_AUTH_NTLM2  4 removed in OpenVPN 2.8 */
 #define HTTP_AUTH_N      5 /* number of HTTP_AUTH methods */
 
 struct http_custom_header
src/openvpn/syshead.h +0 -7
index 627ba92..82452f3 100644
@@ -488,13 +488,6 @@
 #endif
 
 /*
- * Should we include NTLM proxy functionality
- */
-#ifdef ENABLE_NTLM
-#define NTLM 1
-#endif
-
-/*
  * Should we include proxy digest auth functionality
  */
 #define PROXY_DIGEST_AUTH 1
tests/Makefile.am +1 -9
index 4b4bcaa..005ac35 100644
@@ -49,12 +49,4 @@
 ntlm_support_CFLAGS  = -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat -I$(top_srcdir)/tests/unit_tests/openvpn -DNO_CMOCKA @TEST_CFLAGS@
 ntlm_support_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn $(OPTIONAL_CRYPTO_LIBS)
 ntlm_support_SOURCES = ntlm_support.c \
-	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h \
-	$(top_srcdir)/src/openvpn/buffer.c \
-	$(top_srcdir)/src/openvpn/crypto.c \
-	$(top_srcdir)/src/openvpn/crypto_epoch.c \
-	$(top_srcdir)/src/openvpn/crypto_openssl.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls.c \
-	$(top_srcdir)/src/openvpn/otime.c \
-	$(top_srcdir)/src/openvpn/packet_id.c \
-	$(top_srcdir)/src/openvpn/platform.c
+	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h
tests/ntlm_support.c +0 -20
index 7007051..61e5090 100644
@@ -26,30 +26,10 @@
 
 #include "syshead.h"
 
-#include "crypto.h"
 #include "error.h"
 
 int
 main(void)
 {
-#ifdef NTLM
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    provider_t *legacy = crypto_load_provider("legacy");
-    provider_t *def = crypto_load_provider("default");
-#endif
-    if (!md_valid("MD4"))
-    {
-        msg(M_FATAL, "MD4 not supported");
-    }
-    if (!md_valid("MD5"))
-    {
-        msg(M_FATAL, "MD5 not supported");
-    }
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    crypto_unload_provider("legacy", legacy);
-    crypto_unload_provider("default", def);
-#endif
-#else /* ifdef NTLM */
     msg(M_FATAL, "NTLM support not compiled in");
-#endif
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email )

Change subject: Remove NTLM support
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 15 Jan 2026 09:31:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: cron2, flichtenheld, plaisthos.

Hello cron2, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+2 by cron2

The change is no longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfied now.

Change subject: Remove NTLM support
......................................................................

Remove NTLM support

Since Microsoft has abandonded this I think it is time for us to do the same for OpenVPN 2.8.

Leaves a stub ntlm_support in to make cross-branch t_client.rc easier to maintain.

Change-Id I1f5724476862935284f620c54afa510eea03e3f9

---
M CMakeLists.txt
M config.h.cmake.in
M configure.ac
M doc/doxygen/openvpn.doxyfile.in
M doc/man-sections/proxy-options.rst
M src/openvpn/Makefile.am
D src/openvpn/ntlm.c
D src/openvpn/ntlm.h
M src/openvpn/options.c
M src/openvpn/proxy.c
M src/openvpn/proxy.h
M src/openvpn/syshead.h
M tests/Makefile.am
M tests/ntlm_support.c

14 files changed, 9 insertions(+), 626 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/53/1453/2

CMakeLists.txt +0 -2
index e25ecae..566da71 100644
@@ -502,8 +502,6 @@
     src/openvpn/multi.h
     src/openvpn/multi_io.h
     src/openvpn/multi_io.c
-    src/openvpn/ntlm.c
-    src/openvpn/ntlm.h
     src/openvpn/occ.c
     src/openvpn/occ.h
     src/openvpn/openvpn.c
config.h.cmake.in +0 -3
index ddf6174..a93fcd5 100644
@@ -35,9 +35,6 @@
 /* Enable dns-updown script hook */
 #cmakedefine ENABLE_DNS_UPDOWN
 
-/* Enable NTLMv2 proxy support */
-#define ENABLE_NTLM 1
-
 /* Enable management server capability */
 #define ENABLE_MANAGEMENT 1
 
configure.ac +0 -8
index 841b0d1..9fa6a41 100644
@@ -95,13 +95,6 @@
 )
 
 AC_ARG_ENABLE(
-	[ntlm],
-	[AS_HELP_STRING([--disable-ntlm], [disable NTLMv2 proxy support @<:@default=yes@:>@])],
-	,
-	[enable_ntlm="yes"]
-)
-
-AC_ARG_ENABLE(
 	[plugins],
 	[AS_HELP_STRING([--disable-plugins], [disable plug-in support @<:@default=yes@:>@])],
 	,
@@ -1171,7 +1164,6 @@
 test "${enable_fragment}" = "yes" && AC_DEFINE([ENABLE_FRAGMENT], [1], [Enable internal fragmentation support])
 test "${enable_port_share}" = "yes" && AC_DEFINE([ENABLE_PORT_SHARE], [1], [Enable TCP Server port sharing])
 test "${enable_dns_updown_by_default}" = "yes" && AC_DEFINE([ENABLE_DNS_UPDOWN_BY_DEFAULT], [1], [Enable dns-updown hook by default])
-test "${enable_ntlm}" = "yes" && AC_DEFINE([ENABLE_NTLM], [1], [Enable NTLMv2 proxy support])
 test "${enable_crypto_ofb_cfb}" = "yes" && AC_DEFINE([ENABLE_OFB_CFB_MODE], [1], [Enable OFB and CFB cipher modes])
 OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CFLAGS}"
 OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_LIBS}"
doc/doxygen/openvpn.doxyfile.in +0 -1
index bdbc608..5b8e262 100644
@@ -2212,7 +2212,6 @@
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 PREDEFINED             = _WIN32 \
-                         NTLM \
                          USE_LZO \
                          ENABLE_FRAGMENT \
                          P2MP \
doc/man-sections/proxy-options.rst +3 -6
index 38c4578..7123838 100644
@@ -7,7 +7,7 @@
   ``--http-proxy-user-pass`` option (See `INLINE FILE SUPPORT`_).
 
   The last optional argument is an ``auth-method`` which should be one
-  of :code:`none`, :code:`basic`, or :code:`ntlm2`.
+  of :code:`none`, :code:`basic`.
 
   HTTP Digest authentication is supported as well, but only via the
   :code:`auto` or :code:`auto-nct` flags (below).  This must replace
@@ -31,8 +31,6 @@
      http-proxy proxy.example.net 3128 authfile.txt
      # basic authentication, ask user for credentials
      http-proxy proxy.example.net 3128 stdin
-     # NTLM authentication, load credentials from file
-     http-proxy proxy.example.net 3128 authfile.txt ntlm2
      # determine which authentication is required, ask user for credentials
      http-proxy proxy.example.net 3128 auto
      # determine which authentication is required, but reject basic
@@ -47,9 +45,8 @@
      password
      </http-proxy-user-pass>
 
-  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7.
-  :code:`ntlm` now is an alias for :code:`ntlm2`; i.e. OpenVPN will always
-  attempt to use NTLMv2 authentication.
+  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7
+  and support for NTLMv2 proxies was removed with OpenVPN 2.8.
 
 --http-proxy-user-pass userpass
   Overwrite the username/password information for ``--http-proxy``. If specified
src/openvpn/Makefile.am +0 -1
index 3c567aa..ff8cc54 100644
@@ -101,7 +101,6 @@
 	networking_iproute2.c networking_iproute2.h \
 	networking_sitnl.c networking_sitnl.h \
 	networking.h \
-	ntlm.c ntlm.h \
 	occ.c occ.h \
 	openssl_compat.h \
 	pkcs11.c pkcs11.h pkcs11_backend.h \
src/openvpn/ntlm.c deleted +0 -395

395 lines not on this page · raw message

src/openvpn/ntlm.h deleted +0 -12
deleted file mode 100644
index b0a6821..0000000
@@ -1,12 +0,0 @@
-#ifndef NTLM_H
-#define NTLM_H
-
-#if NTLM
-
-const char *ntlm_phase_1(const struct http_proxy_info *p, struct gc_arena *gc);
-
-const char *ntlm_phase_3(const struct http_proxy_info *p, const char *phase_2, struct gc_arena *gc);
-
-#endif
-
-#endif
src/openvpn/options.c +1 -2
index 2bca647..09a5d48 100644
@@ -158,8 +158,7 @@
     "                  through an HTTP proxy at address s and port p.\n"
     "                  If proxy authentication is required,\n"
     "                  up is a file containing username/password on 2 lines, or\n"
-    "                  'stdin' to prompt from console.  Add auth='ntlm2' if\n"
-    "                  the proxy requires NTLM authentication.\n"
+    "                  'stdin' to prompt from console.\n"
     "--http-proxy s p 'auto[-nct]' : Like the above directive, but automatically\n"
     "                  determine auth method and query for username/password\n"
     "                  if needed.  auto-nct disables weak proxy auth methods.\n"
src/openvpn/proxy.c +3 -158

209 lines not on this page · raw message

src/openvpn/proxy.h +1 -1
index 89c2da77..e662e7d 100644
@@ -31,7 +31,7 @@
 #define HTTP_AUTH_BASIC  1
 #define HTTP_AUTH_DIGEST 2
 /* #define HTTP_AUTH_NTLM   3 removed in OpenVPN 2.7 */
-#define HTTP_AUTH_NTLM2  4
+/* #define HTTP_AUTH_NTLM2  4 removed in OpenVPN 2.8 */
 #define HTTP_AUTH_N      5 /* number of HTTP_AUTH methods */
 
 struct http_custom_header
src/openvpn/syshead.h +0 -7
index 582e130..067ee9d 100644
@@ -491,13 +491,6 @@
 #endif
 
 /*
- * Should we include NTLM proxy functionality
- */
-#ifdef ENABLE_NTLM
-#define NTLM 1
-#endif
-
-/*
  * Should we include proxy digest auth functionality
  */
 #define PROXY_DIGEST_AUTH 1
tests/Makefile.am +1 -10
index cb30fe5..3907965 100644
@@ -49,13 +49,4 @@
 ntlm_support_CFLAGS  = -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat -I$(top_srcdir)/tests/unit_tests/openvpn -DNO_CMOCKA @TEST_CFLAGS@
 ntlm_support_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn $(OPTIONAL_CRYPTO_LIBS)
 ntlm_support_SOURCES = ntlm_support.c \
-	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h \
-	$(top_srcdir)/src/openvpn/buffer.c \
-	$(top_srcdir)/src/openvpn/crypto.c \
-	$(top_srcdir)/src/openvpn/crypto_epoch.c \
-	$(top_srcdir)/src/openvpn/crypto_openssl.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls_legacy.c \
-	$(top_srcdir)/src/openvpn/otime.c \
-	$(top_srcdir)/src/openvpn/packet_id.c \
-	$(top_srcdir)/src/openvpn/platform.c
+	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h
tests/ntlm_support.c +0 -20
index 4fd044e..a4ee00e 100644
@@ -26,30 +26,10 @@
 
 #include "syshead.h"
 
-#include "crypto.h"
 #include "error.h"
 
 int
 main(void)
 {
-#ifdef NTLM
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    provider_t *legacy = crypto_load_provider("legacy");
-    provider_t *def = crypto_load_provider("default");
-#endif
-    if (!md_valid("MD4"))
-    {
-        msg(M_FATAL, "MD4 not supported");
-    }
-    if (!md_valid("MD5"))
-    {
-        msg(M_FATAL, "MD5 not supported");
-    }
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    crypto_unload_provider("legacy", legacy);
-    crypto_unload_provider("default", def);
-#endif
-#else /* ifdef NTLM */
     msg(M_FATAL, "NTLM support not compiled in");
-#endif
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>

#4 lore raw
In reply to a message not in the archive

Attention is currently required from: cron2, flichtenheld, plaisthos.

ordex has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email )

Change subject: Remove NTLM support
......................................................................

Patch Set 2: Code-Review+1

(1 comment)

Patchset:

PS2:
I love getting rid of this thing. However, shouldn't we warn user about the option going away? I.e. should we add a warning in 2.7?

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 12 Feb 2026 13:22:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

#5 lore raw
In reply to a message not in the archive

Attention is currently required from: cron2, ordex, plaisthos.

flichtenheld has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email )

Change subject: Remove NTLM support
......................................................................

Patch Set 2:

(1 comment)

Patchset:

PS2:

Quoted 1 line

I love getting rid of this thing. However, shouldn't we warn user about the option going away? I.e. […]

Currently we only have that in the release notes but the code does not issue a warning.

Obviously that would need to go into a separate patch, but yes, if you want that I can add it.

Curious to see whether we get any feedback on the NTLMv1 removal in 2.7. Microsoft is trying to get rid of it as well and with OpenSSL 3 you probably need to add --provider legacy to be able to use it. So it is not like this comes out of nowhere...

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: ordex <[email protected]...>
Gerrit-Comment-Date: Thu, 12 Feb 2026 14:02:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: ordex <[email protected]...>

#6 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, ordex, plaisthos.

cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email )

Change subject: Remove NTLM support
......................................................................

Patch Set 2: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: ordex <[email protected]...>
Gerrit-Comment-Date: Mon, 16 Feb 2026 14:51:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

#7 lore raw

PATCH v2 1/1 Remove NTLM support

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

Since Microsoft has abandonded this I think it is time for us to do the same for OpenVPN 2.8.

Leaves a stub ntlm_support in to make cross-branch t_client.rc easier to maintain.

Change-Id I1f5724476862935284f620c54afa510eea03e3f9

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1453
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1453
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

CMakeLists.txt +0 -2
index e25ecae..566da71 100644
@@ -502,8 +502,6 @@
     src/openvpn/multi.h
     src/openvpn/multi_io.h
     src/openvpn/multi_io.c
-    src/openvpn/ntlm.c
-    src/openvpn/ntlm.h
     src/openvpn/occ.c
     src/openvpn/occ.h
     src/openvpn/openvpn.c
config.h.cmake.in +0 -3
index ddf6174..a93fcd5 100644
@@ -35,9 +35,6 @@
 /* Enable dns-updown script hook */
 #cmakedefine ENABLE_DNS_UPDOWN
 
-/* Enable NTLMv2 proxy support */
-#define ENABLE_NTLM 1
-
 /* Enable management server capability */
 #define ENABLE_MANAGEMENT 1
 
configure.ac +0 -8
index 841b0d1..9fa6a41 100644
@@ -95,13 +95,6 @@
 )
 
 AC_ARG_ENABLE(
-	[ntlm],
-	[AS_HELP_STRING([--disable-ntlm], [disable NTLMv2 proxy support @<:@default=yes@:>@])],
-	,
-	[enable_ntlm="yes"]
-)
-
-AC_ARG_ENABLE(
 	[plugins],
 	[AS_HELP_STRING([--disable-plugins], [disable plug-in support @<:@default=yes@:>@])],
 	,
@@ -1171,7 +1164,6 @@
 test "${enable_fragment}" = "yes" && AC_DEFINE([ENABLE_FRAGMENT], [1], [Enable internal fragmentation support])
 test "${enable_port_share}" = "yes" && AC_DEFINE([ENABLE_PORT_SHARE], [1], [Enable TCP Server port sharing])
 test "${enable_dns_updown_by_default}" = "yes" && AC_DEFINE([ENABLE_DNS_UPDOWN_BY_DEFAULT], [1], [Enable dns-updown hook by default])
-test "${enable_ntlm}" = "yes" && AC_DEFINE([ENABLE_NTLM], [1], [Enable NTLMv2 proxy support])
 test "${enable_crypto_ofb_cfb}" = "yes" && AC_DEFINE([ENABLE_OFB_CFB_MODE], [1], [Enable OFB and CFB cipher modes])
 OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CFLAGS}"
 OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_LIBS}"
doc/doxygen/openvpn.doxyfile.in +0 -1
index bdbc608..5b8e262 100644
@@ -2212,7 +2212,6 @@
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 PREDEFINED             = _WIN32 \
-                         NTLM \
                          USE_LZO \
                          ENABLE_FRAGMENT \
                          P2MP \
doc/man-sections/proxy-options.rst +3 -6
index 38c4578..7123838 100644
@@ -7,7 +7,7 @@
   ``--http-proxy-user-pass`` option (See `INLINE FILE SUPPORT`_).
 
   The last optional argument is an ``auth-method`` which should be one
-  of :code:`none`, :code:`basic`, or :code:`ntlm2`.
+  of :code:`none`, :code:`basic`.
 
   HTTP Digest authentication is supported as well, but only via the
   :code:`auto` or :code:`auto-nct` flags (below).  This must replace
@@ -31,8 +31,6 @@
      http-proxy proxy.example.net 3128 authfile.txt
      # basic authentication, ask user for credentials
      http-proxy proxy.example.net 3128 stdin
-     # NTLM authentication, load credentials from file
-     http-proxy proxy.example.net 3128 authfile.txt ntlm2
      # determine which authentication is required, ask user for credentials
      http-proxy proxy.example.net 3128 auto
      # determine which authentication is required, but reject basic
@@ -47,9 +45,8 @@
      password
      </http-proxy-user-pass>
 
-  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7.
-  :code:`ntlm` now is an alias for :code:`ntlm2`; i.e. OpenVPN will always
-  attempt to use NTLMv2 authentication.
+  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7
+  and support for NTLMv2 proxies was removed with OpenVPN 2.8.
 
 --http-proxy-user-pass userpass
   Overwrite the username/password information for ``--http-proxy``. If specified
src/openvpn/Makefile.am +0 -1
index 3c567aa..ff8cc54 100644
@@ -101,7 +101,6 @@
 	networking_iproute2.c networking_iproute2.h \
 	networking_sitnl.c networking_sitnl.h \
 	networking.h \
-	ntlm.c ntlm.h \
 	occ.c occ.h \
 	openssl_compat.h \
 	pkcs11.c pkcs11.h pkcs11_backend.h \
src/openvpn/ntlm.c deleted +0 -395

395 lines not on this page · raw message

src/openvpn/ntlm.h deleted +0 -12
deleted file mode 100644
index b0a6821..0000000
@@ -1,12 +0,0 @@
-#ifndef NTLM_H
-#define NTLM_H
-
-#if NTLM
-
-const char *ntlm_phase_1(const struct http_proxy_info *p, struct gc_arena *gc);
-
-const char *ntlm_phase_3(const struct http_proxy_info *p, const char *phase_2, struct gc_arena *gc);
-
-#endif
-
-#endif
src/openvpn/options.c +1 -2
index 2bca647..09a5d48 100644
@@ -158,8 +158,7 @@
     "                  through an HTTP proxy at address s and port p.\n"
     "                  If proxy authentication is required,\n"
     "                  up is a file containing username/password on 2 lines, or\n"
-    "                  'stdin' to prompt from console.  Add auth='ntlm2' if\n"
-    "                  the proxy requires NTLM authentication.\n"
+    "                  'stdin' to prompt from console.\n"
     "--http-proxy s p 'auto[-nct]' : Like the above directive, but automatically\n"
     "                  determine auth method and query for username/password\n"
     "                  if needed.  auto-nct disables weak proxy auth methods.\n"
src/openvpn/proxy.c +3 -158

209 lines not on this page · raw message

src/openvpn/proxy.h +1 -1
index 89c2da77..e662e7d 100644
@@ -31,7 +31,7 @@
 #define HTTP_AUTH_BASIC  1
 #define HTTP_AUTH_DIGEST 2
 /* #define HTTP_AUTH_NTLM   3 removed in OpenVPN 2.7 */
-#define HTTP_AUTH_NTLM2  4
+/* #define HTTP_AUTH_NTLM2  4 removed in OpenVPN 2.8 */
 #define HTTP_AUTH_N      5 /* number of HTTP_AUTH methods */
 
 struct http_custom_header
src/openvpn/syshead.h +0 -7
index 582e130..067ee9d 100644
@@ -491,13 +491,6 @@
 #endif
 
 /*
- * Should we include NTLM proxy functionality
- */
-#ifdef ENABLE_NTLM
-#define NTLM 1
-#endif
-
-/*
  * Should we include proxy digest auth functionality
  */
 #define PROXY_DIGEST_AUTH 1
tests/Makefile.am +1 -10
index cb30fe5..3907965 100644
@@ -49,13 +49,4 @@
 ntlm_support_CFLAGS  = -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat -I$(top_srcdir)/tests/unit_tests/openvpn -DNO_CMOCKA @TEST_CFLAGS@
 ntlm_support_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn $(OPTIONAL_CRYPTO_LIBS)
 ntlm_support_SOURCES = ntlm_support.c \
-	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h \
-	$(top_srcdir)/src/openvpn/buffer.c \
-	$(top_srcdir)/src/openvpn/crypto.c \
-	$(top_srcdir)/src/openvpn/crypto_epoch.c \
-	$(top_srcdir)/src/openvpn/crypto_openssl.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls_legacy.c \
-	$(top_srcdir)/src/openvpn/otime.c \
-	$(top_srcdir)/src/openvpn/packet_id.c \
-	$(top_srcdir)/src/openvpn/platform.c
+	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h
tests/ntlm_support.c +0 -20
index 4fd044e..a4ee00e 100644
@@ -26,30 +26,10 @@
 
 #include "syshead.h"
 
-#include "crypto.h"
 #include "error.h"
 
 int
 main(void)
 {
-#ifdef NTLM
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    provider_t *legacy = crypto_load_provider("legacy");
-    provider_t *def = crypto_load_provider("default");
-#endif
-    if (!md_valid("MD4"))
-    {
-        msg(M_FATAL, "MD4 not supported");
-    }
-    if (!md_valid("MD5"))
-    {
-        msg(M_FATAL, "MD5 not supported");
-    }
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    crypto_unload_provider("legacy", legacy);
-    crypto_unload_provider("default", def);
-#endif
-#else /* ifdef NTLM */
     msg(M_FATAL, "NTLM support not compiled in");
-#endif
 }
#8 lore raw

[Openvpn-devel] [PATCH applied] Re: Remove NTLM support

So this is the first "real 2.8" patch - removing NTLM support. This code base was in need for an overhaul for a long time, but if Microsoft drops NTLM anyway, so can we... (if people come running and screaming, we can bring it back :-) )

Stared-at-code (easy), and had buildbot compile & test it.

Your patch has been applied to the master branch.

commit 70ab9347f893a34010a0fa39722c597f1754b8da

Author: Frank Lichtenheld
Date:   Mon Feb 16 15:51:59 2026 +0100
     Remove NTLM support

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1453
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg35650.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#9 lore raw
In reply to a message not in the archive

Attention is currently required from: ordex.

cron2 has uploaded a new patch set (#3) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email )

The following approvals got outdated and were removed:
Code-Review+1 by ordex, Code-Review+2 by cron2

Change subject: Remove NTLM support
......................................................................

Remove NTLM support

Since Microsoft has abandonded this I think it is time for us to do the same for OpenVPN 2.8.

Leaves a stub ntlm_support in to make cross-branch t_client.rc easier to maintain.

Change-Id I1f5724476862935284f620c54afa510eea03e3f9

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1453
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35650.html

---
M CMakeLists.txt
M config.h.cmake.in
M configure.ac
M doc/doxygen/openvpn.doxyfile.in
M doc/man-sections/proxy-options.rst
M src/openvpn/Makefile.am
D src/openvpn/ntlm.c
D src/openvpn/ntlm.h
M src/openvpn/options.c
M src/openvpn/proxy.c
M src/openvpn/proxy.h
M src/openvpn/syshead.h
M tests/Makefile.am
M tests/ntlm_support.c

14 files changed, 9 insertions(+), 626 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/53/1453/3

CMakeLists.txt +0 -2
index e25ecae..566da71 100644
@@ -502,8 +502,6 @@
     src/openvpn/multi.h
     src/openvpn/multi_io.h
     src/openvpn/multi_io.c
-    src/openvpn/ntlm.c
-    src/openvpn/ntlm.h
     src/openvpn/occ.c
     src/openvpn/occ.h
     src/openvpn/openvpn.c
config.h.cmake.in +0 -3
index ddf6174..a93fcd5 100644
@@ -35,9 +35,6 @@
 /* Enable dns-updown script hook */
 #cmakedefine ENABLE_DNS_UPDOWN
 
-/* Enable NTLMv2 proxy support */
-#define ENABLE_NTLM 1
-
 /* Enable management server capability */
 #define ENABLE_MANAGEMENT 1
 
configure.ac +0 -8
index 841b0d1..9fa6a41 100644
@@ -95,13 +95,6 @@
 )
 
 AC_ARG_ENABLE(
-	[ntlm],
-	[AS_HELP_STRING([--disable-ntlm], [disable NTLMv2 proxy support @<:@default=yes@:>@])],
-	,
-	[enable_ntlm="yes"]
-)
-
-AC_ARG_ENABLE(
 	[plugins],
 	[AS_HELP_STRING([--disable-plugins], [disable plug-in support @<:@default=yes@:>@])],
 	,
@@ -1171,7 +1164,6 @@
 test "${enable_fragment}" = "yes" && AC_DEFINE([ENABLE_FRAGMENT], [1], [Enable internal fragmentation support])
 test "${enable_port_share}" = "yes" && AC_DEFINE([ENABLE_PORT_SHARE], [1], [Enable TCP Server port sharing])
 test "${enable_dns_updown_by_default}" = "yes" && AC_DEFINE([ENABLE_DNS_UPDOWN_BY_DEFAULT], [1], [Enable dns-updown hook by default])
-test "${enable_ntlm}" = "yes" && AC_DEFINE([ENABLE_NTLM], [1], [Enable NTLMv2 proxy support])
 test "${enable_crypto_ofb_cfb}" = "yes" && AC_DEFINE([ENABLE_OFB_CFB_MODE], [1], [Enable OFB and CFB cipher modes])
 OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CFLAGS}"
 OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_LIBS}"
doc/doxygen/openvpn.doxyfile.in +0 -1
index bdbc608..5b8e262 100644
@@ -2212,7 +2212,6 @@
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 PREDEFINED             = _WIN32 \
-                         NTLM \
                          USE_LZO \
                          ENABLE_FRAGMENT \
                          P2MP \
doc/man-sections/proxy-options.rst +3 -6
index 38c4578..7123838 100644
@@ -7,7 +7,7 @@
   ``--http-proxy-user-pass`` option (See `INLINE FILE SUPPORT`_).
 
   The last optional argument is an ``auth-method`` which should be one
-  of :code:`none`, :code:`basic`, or :code:`ntlm2`.
+  of :code:`none`, :code:`basic`.
 
   HTTP Digest authentication is supported as well, but only via the
   :code:`auto` or :code:`auto-nct` flags (below).  This must replace
@@ -31,8 +31,6 @@
      http-proxy proxy.example.net 3128 authfile.txt
      # basic authentication, ask user for credentials
      http-proxy proxy.example.net 3128 stdin
-     # NTLM authentication, load credentials from file
-     http-proxy proxy.example.net 3128 authfile.txt ntlm2
      # determine which authentication is required, ask user for credentials
      http-proxy proxy.example.net 3128 auto
      # determine which authentication is required, but reject basic
@@ -47,9 +45,8 @@
      password
      </http-proxy-user-pass>
 
-  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7.
-  :code:`ntlm` now is an alias for :code:`ntlm2`; i.e. OpenVPN will always
-  attempt to use NTLMv2 authentication.
+  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7
+  and support for NTLMv2 proxies was removed with OpenVPN 2.8.
 
 --http-proxy-user-pass userpass
   Overwrite the username/password information for ``--http-proxy``. If specified
src/openvpn/Makefile.am +0 -1
index 3c567aa..ff8cc54 100644
@@ -101,7 +101,6 @@
 	networking_iproute2.c networking_iproute2.h \
 	networking_sitnl.c networking_sitnl.h \
 	networking.h \
-	ntlm.c ntlm.h \
 	occ.c occ.h \
 	openssl_compat.h \
 	pkcs11.c pkcs11.h pkcs11_backend.h \
src/openvpn/ntlm.c deleted +0 -395

395 lines not on this page · raw message

src/openvpn/ntlm.h deleted +0 -12
deleted file mode 100644
index b0a6821..0000000
@@ -1,12 +0,0 @@
-#ifndef NTLM_H
-#define NTLM_H
-
-#if NTLM
-
-const char *ntlm_phase_1(const struct http_proxy_info *p, struct gc_arena *gc);
-
-const char *ntlm_phase_3(const struct http_proxy_info *p, const char *phase_2, struct gc_arena *gc);
-
-#endif
-
-#endif
src/openvpn/options.c +1 -2
index 2bca647..09a5d48 100644
@@ -158,8 +158,7 @@
     "                  through an HTTP proxy at address s and port p.\n"
     "                  If proxy authentication is required,\n"
     "                  up is a file containing username/password on 2 lines, or\n"
-    "                  'stdin' to prompt from console.  Add auth='ntlm2' if\n"
-    "                  the proxy requires NTLM authentication.\n"
+    "                  'stdin' to prompt from console.\n"
     "--http-proxy s p 'auto[-nct]' : Like the above directive, but automatically\n"
     "                  determine auth method and query for username/password\n"
     "                  if needed.  auto-nct disables weak proxy auth methods.\n"
src/openvpn/proxy.c +3 -158

209 lines not on this page · raw message

src/openvpn/proxy.h +1 -1
index 89c2da77..e662e7d 100644
@@ -31,7 +31,7 @@
 #define HTTP_AUTH_BASIC  1
 #define HTTP_AUTH_DIGEST 2
 /* #define HTTP_AUTH_NTLM   3 removed in OpenVPN 2.7 */
-#define HTTP_AUTH_NTLM2  4
+/* #define HTTP_AUTH_NTLM2  4 removed in OpenVPN 2.8 */
 #define HTTP_AUTH_N      5 /* number of HTTP_AUTH methods */
 
 struct http_custom_header
src/openvpn/syshead.h +0 -7
index 582e130..067ee9d 100644
@@ -491,13 +491,6 @@
 #endif
 
 /*
- * Should we include NTLM proxy functionality
- */
-#ifdef ENABLE_NTLM
-#define NTLM 1
-#endif
-
-/*
  * Should we include proxy digest auth functionality
  */
 #define PROXY_DIGEST_AUTH 1
tests/Makefile.am +1 -10
index cb30fe5..3907965 100644
@@ -49,13 +49,4 @@
 ntlm_support_CFLAGS  = -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat -I$(top_srcdir)/tests/unit_tests/openvpn -DNO_CMOCKA @TEST_CFLAGS@
 ntlm_support_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn $(OPTIONAL_CRYPTO_LIBS)
 ntlm_support_SOURCES = ntlm_support.c \
-	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h \
-	$(top_srcdir)/src/openvpn/buffer.c \
-	$(top_srcdir)/src/openvpn/crypto.c \
-	$(top_srcdir)/src/openvpn/crypto_epoch.c \
-	$(top_srcdir)/src/openvpn/crypto_openssl.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls_legacy.c \
-	$(top_srcdir)/src/openvpn/otime.c \
-	$(top_srcdir)/src/openvpn/packet_id.c \
-	$(top_srcdir)/src/openvpn/platform.c
+	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h
tests/ntlm_support.c +0 -20
index 4fd044e..a4ee00e 100644
@@ -26,30 +26,10 @@
 
 #include "syshead.h"
 
-#include "crypto.h"
 #include "error.h"
 
 int
 main(void)
 {
-#ifdef NTLM
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    provider_t *legacy = crypto_load_provider("legacy");
-    provider_t *def = crypto_load_provider("default");
-#endif
-    if (!md_valid("MD4"))
-    {
-        msg(M_FATAL, "MD4 not supported");
-    }
-    if (!md_valid("MD5"))
-    {
-        msg(M_FATAL, "MD5 not supported");
-    }
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    crypto_unload_provider("legacy", legacy);
-    crypto_unload_provider("default", def);
-#endif
-#else /* ifdef NTLM */
     msg(M_FATAL, "NTLM support not compiled in");
-#endif
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: ordex <[email protected]...>

#10 lore raw
In reply to a message not in the archive

Attention is currently required from: ordex.

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email )

Change subject: Remove NTLM support
......................................................................

Remove NTLM support

Since Microsoft has abandonded this I think it is time for us to do the same for OpenVPN 2.8.

Leaves a stub ntlm_support in to make cross-branch t_client.rc easier to maintain.

Change-Id I1f5724476862935284f620c54afa510eea03e3f9

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1453
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35650.html

---
M CMakeLists.txt
M config.h.cmake.in
M configure.ac
M doc/doxygen/openvpn.doxyfile.in
M doc/man-sections/proxy-options.rst
M src/openvpn/Makefile.am
D src/openvpn/ntlm.c
D src/openvpn/ntlm.h
M src/openvpn/options.c
M src/openvpn/proxy.c
M src/openvpn/proxy.h
M src/openvpn/syshead.h
M tests/Makefile.am
M tests/ntlm_support.c

14 files changed, 9 insertions(+), 626 deletions(-)
CMakeLists.txt +0 -2
index e25ecae..566da71 100644
@@ -502,8 +502,6 @@
     src/openvpn/multi.h
     src/openvpn/multi_io.h
     src/openvpn/multi_io.c
-    src/openvpn/ntlm.c
-    src/openvpn/ntlm.h
     src/openvpn/occ.c
     src/openvpn/occ.h
     src/openvpn/openvpn.c
config.h.cmake.in +0 -3
index ddf6174..a93fcd5 100644
@@ -35,9 +35,6 @@
 /* Enable dns-updown script hook */
 #cmakedefine ENABLE_DNS_UPDOWN
 
-/* Enable NTLMv2 proxy support */
-#define ENABLE_NTLM 1
-
 /* Enable management server capability */
 #define ENABLE_MANAGEMENT 1
 
configure.ac +0 -8
index 841b0d1..9fa6a41 100644
@@ -95,13 +95,6 @@
 )
 
 AC_ARG_ENABLE(
-	[ntlm],
-	[AS_HELP_STRING([--disable-ntlm], [disable NTLMv2 proxy support @<:@default=yes@:>@])],
-	,
-	[enable_ntlm="yes"]
-)
-
-AC_ARG_ENABLE(
 	[plugins],
 	[AS_HELP_STRING([--disable-plugins], [disable plug-in support @<:@default=yes@:>@])],
 	,
@@ -1171,7 +1164,6 @@
 test "${enable_fragment}" = "yes" && AC_DEFINE([ENABLE_FRAGMENT], [1], [Enable internal fragmentation support])
 test "${enable_port_share}" = "yes" && AC_DEFINE([ENABLE_PORT_SHARE], [1], [Enable TCP Server port sharing])
 test "${enable_dns_updown_by_default}" = "yes" && AC_DEFINE([ENABLE_DNS_UPDOWN_BY_DEFAULT], [1], [Enable dns-updown hook by default])
-test "${enable_ntlm}" = "yes" && AC_DEFINE([ENABLE_NTLM], [1], [Enable NTLMv2 proxy support])
 test "${enable_crypto_ofb_cfb}" = "yes" && AC_DEFINE([ENABLE_OFB_CFB_MODE], [1], [Enable OFB and CFB cipher modes])
 OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CFLAGS}"
 OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_LIBS}"
doc/doxygen/openvpn.doxyfile.in +0 -1
index bdbc608..5b8e262 100644
@@ -2212,7 +2212,6 @@
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 PREDEFINED             = _WIN32 \
-                         NTLM \
                          USE_LZO \
                          ENABLE_FRAGMENT \
                          P2MP \
doc/man-sections/proxy-options.rst +3 -6
index 38c4578..7123838 100644
@@ -7,7 +7,7 @@
   ``--http-proxy-user-pass`` option (See `INLINE FILE SUPPORT`_).
 
   The last optional argument is an ``auth-method`` which should be one
-  of :code:`none`, :code:`basic`, or :code:`ntlm2`.
+  of :code:`none`, :code:`basic`.
 
   HTTP Digest authentication is supported as well, but only via the
   :code:`auto` or :code:`auto-nct` flags (below).  This must replace
@@ -31,8 +31,6 @@
      http-proxy proxy.example.net 3128 authfile.txt
      # basic authentication, ask user for credentials
      http-proxy proxy.example.net 3128 stdin
-     # NTLM authentication, load credentials from file
-     http-proxy proxy.example.net 3128 authfile.txt ntlm2
      # determine which authentication is required, ask user for credentials
      http-proxy proxy.example.net 3128 auto
      # determine which authentication is required, but reject basic
@@ -47,9 +45,8 @@
      password
      </http-proxy-user-pass>
 
-  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7.
-  :code:`ntlm` now is an alias for :code:`ntlm2`; i.e. OpenVPN will always
-  attempt to use NTLMv2 authentication.
+  Note that support for NTLMv1 proxies was removed with OpenVPN 2.7
+  and support for NTLMv2 proxies was removed with OpenVPN 2.8.
 
 --http-proxy-user-pass userpass
   Overwrite the username/password information for ``--http-proxy``. If specified
src/openvpn/Makefile.am +0 -1
index 3c567aa..ff8cc54 100644
@@ -101,7 +101,6 @@
 	networking_iproute2.c networking_iproute2.h \
 	networking_sitnl.c networking_sitnl.h \
 	networking.h \
-	ntlm.c ntlm.h \
 	occ.c occ.h \
 	openssl_compat.h \
 	pkcs11.c pkcs11.h pkcs11_backend.h \
src/openvpn/ntlm.c deleted +0 -395

395 lines not on this page · raw message

src/openvpn/ntlm.h deleted +0 -12
deleted file mode 100644
index b0a6821..0000000
@@ -1,12 +0,0 @@
-#ifndef NTLM_H
-#define NTLM_H
-
-#if NTLM
-
-const char *ntlm_phase_1(const struct http_proxy_info *p, struct gc_arena *gc);
-
-const char *ntlm_phase_3(const struct http_proxy_info *p, const char *phase_2, struct gc_arena *gc);
-
-#endif
-
-#endif
src/openvpn/options.c +1 -2
index 2bca647..09a5d48 100644
@@ -158,8 +158,7 @@
     "                  through an HTTP proxy at address s and port p.\n"
     "                  If proxy authentication is required,\n"
     "                  up is a file containing username/password on 2 lines, or\n"
-    "                  'stdin' to prompt from console.  Add auth='ntlm2' if\n"
-    "                  the proxy requires NTLM authentication.\n"
+    "                  'stdin' to prompt from console.\n"
     "--http-proxy s p 'auto[-nct]' : Like the above directive, but automatically\n"
     "                  determine auth method and query for username/password\n"
     "                  if needed.  auto-nct disables weak proxy auth methods.\n"
src/openvpn/proxy.c +3 -158

209 lines not on this page · raw message

src/openvpn/proxy.h +1 -1
index 89c2da77..e662e7d 100644
@@ -31,7 +31,7 @@
 #define HTTP_AUTH_BASIC  1
 #define HTTP_AUTH_DIGEST 2
 /* #define HTTP_AUTH_NTLM   3 removed in OpenVPN 2.7 */
-#define HTTP_AUTH_NTLM2  4
+/* #define HTTP_AUTH_NTLM2  4 removed in OpenVPN 2.8 */
 #define HTTP_AUTH_N      5 /* number of HTTP_AUTH methods */
 
 struct http_custom_header
src/openvpn/syshead.h +0 -7
index 582e130..067ee9d 100644
@@ -491,13 +491,6 @@
 #endif
 
 /*
- * Should we include NTLM proxy functionality
- */
-#ifdef ENABLE_NTLM
-#define NTLM 1
-#endif
-
-/*
  * Should we include proxy digest auth functionality
  */
 #define PROXY_DIGEST_AUTH 1
tests/Makefile.am +1 -10
index cb30fe5..3907965 100644
@@ -49,13 +49,4 @@
 ntlm_support_CFLAGS  = -I$(top_srcdir)/src/openvpn -I$(top_srcdir)/src/compat -I$(top_srcdir)/tests/unit_tests/openvpn -DNO_CMOCKA @TEST_CFLAGS@
 ntlm_support_LDFLAGS = @TEST_LDFLAGS@ -L$(top_srcdir)/src/openvpn $(OPTIONAL_CRYPTO_LIBS)
 ntlm_support_SOURCES = ntlm_support.c \
-	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h \
-	$(top_srcdir)/src/openvpn/buffer.c \
-	$(top_srcdir)/src/openvpn/crypto.c \
-	$(top_srcdir)/src/openvpn/crypto_epoch.c \
-	$(top_srcdir)/src/openvpn/crypto_openssl.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls.c \
-	$(top_srcdir)/src/openvpn/crypto_mbedtls_legacy.c \
-	$(top_srcdir)/src/openvpn/otime.c \
-	$(top_srcdir)/src/openvpn/packet_id.c \
-	$(top_srcdir)/src/openvpn/platform.c
+	unit_tests/openvpn/mock_msg.c unit_tests/openvpn/mock_msg.h
tests/ntlm_support.c +0 -20
index 4fd044e..a4ee00e 100644
@@ -26,30 +26,10 @@
 
 #include "syshead.h"
 
-#include "crypto.h"
 #include "error.h"
 
 int
 main(void)
 {
-#ifdef NTLM
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    provider_t *legacy = crypto_load_provider("legacy");
-    provider_t *def = crypto_load_provider("default");
-#endif
-    if (!md_valid("MD4"))
-    {
-        msg(M_FATAL, "MD4 not supported");
-    }
-    if (!md_valid("MD5"))
-    {
-        msg(M_FATAL, "MD5 not supported");
-    }
-#if defined(ENABLE_CRYPTO_OPENSSL)
-    crypto_unload_provider("legacy", legacy);
-    crypto_unload_provider("default", def);
-#endif
-#else /* ifdef NTLM */
     msg(M_FATAL, "NTLM support not compiled in");
-#endif
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1453?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1f5724476862935284f620c54afa510eea03e3f9
Gerrit-Change-Number: 1453
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: ordex <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: ordex <[email protected]...>